/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.tspp.dao.dto;

import java.io.Serializable;

/**
 * Transfer object for Exam_result table(DAO pattern)
 * @author Maks
 */
public class ExamResult implements Serializable {

    /** This attribute maps to the column ID_EXAM in the EXAM_RESULT table.*/
    private int idExam;

    /** This attribute maps to the column ID_ENTRANT in the EXAM_RESULT table.*/
    private int idEntrant;

    /** This attribute maps to the column POINTS in the EXAM_RESULT table.*/
    private int points;

    /**
     * Return value of the column ID_EXAM in the EXAM_RESULT table
     * @return int id of exam
     */
    public int getIdExam() {
        return idExam;
    }

    /**
     * Set id of exam
     * @param idExam
     */
    public void setIdExam(int idExam) {
        this.idExam = idExam;
    }

    /**
     * Return value of the column ID_ENTRANT in the EXAM_RESULT table
     * @return int id of entrant
     */
    public int getIdEntrant() {
        return idEntrant;
    }

    /**
     * Set id of entrant
     * @param idEntrant
     */
    public void setIdEntrant(int idEntrant) {
        this.idEntrant = idEntrant;
    }

    /**
     * Return value of the column POINTS in the EXAM_RESULT table
     * @return int entrant's points for the exam
     */
    public int getPoints() {
        return points;
    }

    /**
     * Set the points for the exam
     * @param points
     */
    public void setPoints(int points) {
        this.points = points;
    }

    /**
     * Method 'equals'
     *
     * @param _other
     * @return boolean
     */
    @Override
    public boolean equals(Object _other) {
        if (_other == null) {
            return false;
        }

        if (_other == this) {
            return true;
        }

        if (!(_other instanceof ExamResult)) {
            return false;
        }

        final ExamResult _cast = (ExamResult) _other;
        if (idExam != _cast.idExam) {
            return false;
        }

        if (idEntrant != _cast.idEntrant) {
            return false;
        }

        if (points != _cast.points) {
            return false;
        }

        return true;
    }

    /**
     * Method 'hashCode'
     *
     * @return int
     */
    @Override
    public int hashCode() {
        int _hashCode = 0;
        _hashCode = 29 * _hashCode + idExam;
        _hashCode = 29 * _hashCode + idEntrant;
        _hashCode = 29 * _hashCode + points;
        return _hashCode;
    }

    /**
     * Method 'toString'
     *
     * @return String
     */
    @Override
    public String toString() {
        StringBuilder ret = new StringBuilder();
        ret.append("com.tspp.dao.dto.ExamResult: ");
        ret.append("idExam=").append(idExam);
        ret.append(", idEntrant=").append(idEntrant);
        ret.append(", points=").append(points);
        return ret.toString();
    }
}
